package com.elong.businesstravel.modules.home;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

import com.elong.businesstravel.R;
import com.elong.businesstravel.base.baseactivity.BaseActivity;
import com.elong.businesstravel.modules.home.adapter.SimpleListAdapter;
/**
 * 发票类型
 * @author lenovo
 *
 */
public class InvoiceTypeActivity extends BaseActivity {

	private ListView mListView;
	private SimpleListAdapter mSimpleListAdapter;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_invoice_type);
		 
		mListView = (ListView)findViewById(R.id.listView);
		mSimpleListAdapter = new SimpleListAdapter(mContext, mApplication.mInvoiceTypeList, "");
		mListView.setAdapter(mSimpleListAdapter);
		
		mListView.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
					long arg3) {
				Intent intent = new Intent();
				intent.putExtra("InvoiceType", mApplication.mInvoiceTypeList.get(arg2));
				setResult(RESULT_OK, intent);
				finish();
			}
		});
	}
	
}
